//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package objects;

import java.util.ArrayList;
import java.util.Collection;

public class AnimalsProduction extends ProductionFactories {
  final String animalName;

  public AnimalsProduction(String animal) {
    this.animalName = animal;
  }

  public String getProductionName() {
    return this.animalName;
  }

  public int getObjectClass() {
    return 15;
  }

  public boolean checkUnlockLevel(ProductionsGoodEntry pge, Integer level) {
    return false;
  }

  public int getUnitsMultiplier() {
    return 1;
  }

  public ProductionsGoodEntry getGoodById(Integer id) {
    AnimalEntry a = Animals.getByName(this.getProductionName());
    return a == null?null:a.getGoodById(id);
  }

  public ProductionsGoodEntry getGoodByName(String name) {
    AnimalEntry a = Animals.getByName(this.getProductionName());
    return a == null?null:a.getGoodByName(name);
  }

  public Collection<ProductionsGoodEntry> getGoods() {
    ArrayList rval = new ArrayList();
    AnimalEntry a = Animals.getByName(this.getProductionName());
    if(a != null) {
      rval.add(a.getGoodByName(a.getGood()));
    }

    return rval;
  }
}
